<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
     SessionId:<%=session.getId() %>
     <br><br>
     IsNew:<%=session.isNew() %>
     <br><br>
     MaxInactiveInterval:<%=session.getMaxInactiveInterval() %>
     <br><br>
     LastAccessedTime:<%=session.getLastAccessedTime() %>
     <br><br>
     <%
     Object userName=session.getAttribute("userName");
     if(userName==null){
    	 userName="";
     }
     %>
     <form action="hello.jsp" method="post">
     username:<input type="text" name="userName" value="<%=userName%>">
     <input type="submit" value="Login">
     </form>
</body>
</html>